# See https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/

snippet doc
alias title
abbr Start a new document
options head
    = ${1:Document Name}
    ${2:Alice <alice@example.com>}
    ${3:Revision line}
    :toc:
    :imagesdir: img/
    :homepage: https://www.example.com
    :icons: font
    :data-uri:

    ${0}

snippet source
alias block-source
abbr source code block --- source ---
options head
    [source,${1:language}]
    ----
    ${0}
    ----

snippet quote
alias block-quote
abbr quote block --- text ---
options head
    [quote, ${1:Name}, ${2:Occasion}}]
    ____
    ${0}
    ____

snippet literalblock
alias block-literal
abbr literal block ... text ...
options head
    ....
    ${0}
    ....

snippet bold
abbr *bold*
options word
    *${1}*${0}

snippet italic
abbr _italic_
options word
    _${1}_${0}

snippet monospace
abbr `monospace`
options word
    \`${1}\`${0}

snippet codespan
abbr `+codespan+`
options word
    \`+${1}+\`${0}

snippet verb
abbr +verbatim+
options word
    +${1}+${0}

snippet heading
alias section
abbr == heading on level 2
options head
    == ${1:Title}

    ${0}

snippet heading-anchor
alias section-anchor
abbr == heading on level 2 with anchor
options head
    [#${2:Id}]
    == ${1:Title}

    ${0}

snippet inc
abbr include::example.doc
options head
    include::${1:example.doc}[]${0}

snippet hrule
abbr horizontal rule
options head
    '''
    ${0}

snippet pagebreak
abbr page break
options head
    <<<
    ${0}

snippet def
abbr definition
options head
    ${1:definiendum}::
    ${2:definiens}

snippet table
abbr table
options head
    [cols="${1}", options="header"]
    |===
    |${2:row1-col1}
    ${0}

    |===

snippet tablecsv
alias csvtable
abbr CSV table
options head
    [%header,format=csv]
    |===
    ${0}
    |===

snippet link
alias extlink
abbr External link
options word
    ${1:https://www.example.org}[${2:Text}]${0}

snippet linkrel
abbr Relative link
options word
    link:${1:/example.pdf}[${2:Text}]${0}

snippet mailto
abbr mailto link
options word
    mailto:${1:alice@example.com}[${2:Alice}]${0}

snippet anchor
abbr [[id]] text
options word
    [[${1:id}]]${0}

snippet block-anchor
alias anchorblock
abbr [#anchor] #text#, itemize, ...
options head
    [#${1:Id}] ${0}

snippet ref
abbr reference to anchor
options word
    <<${1:id}>>${0}

snippet image
abbr image::file[desc]
options head
    image::${1:example.jpg}[${2:Description}]
    ${0}

snippet imagecenter
abbr Centered image::file[desc]
options head
    image::${1:example.jpg}[${2:Description},align="center"]
    ${0}

snippet imageinline
abbr Inline image:file[desc]
options word
    image:${1:example.jpg}[${2:Description}]${0}

snippet footnote
abbr footnote
options word
    .footnote:[${1:footnotetext}]${0}

snippet bib
abbr bibliography
options head
    [bibliography]
    == References

    - [[${1:id}]] ${2:Entry}
    ${0}

